package com.angel.domain.angeluser.factory;

import com.angel.domain.angeluser.aggregates.AngelUser;
import com.angel.domain.angeluser.entities.AngelUserInfo;
import com.angel.domain.angeluser.valueobjects.*;

public class AngelUserFactory {

    public static AngelUser create(AngelUserId angelUserId,
                                   AngelUserInfo angelUserInfo,
                                   AngelUserLevelInfo angelUserLevelInfo,
                                   CreateInfo createInfo) {

        AngelUser angelUser = new AngelUser(angelUserId,angelUserInfo,angelUserLevelInfo,createInfo);
        return angelUser;
    }

    public static AngelUser create(WeChatNickName weChatNickName, WeChatOpenId weChatOpenId, WeChatAvatarUrl weChatAvatarUrl) {
        // 创建用户
        AngelUser angelUser = new AngelUser(
                WeChatInfo.create(
                        weChatNickName,
                        weChatOpenId,
                        weChatAvatarUrl
                )
        );

        return angelUser;
    }

}
